package ch.nostromo.tiffanys.game.move;

public class MoveInput {
  
  private String from = "";
  private String to = "";

  private int promotion = 0;
  
  private boolean isScored = false;
  private int score = -1;
  private int scoreDepth = -1;
  private MoveInput[] scoreTree = null;

  private String sanInput = null;
  
  public String getSanInput() {
    return sanInput;
  }

  public void setSanInput(String sanInput) {
    this.sanInput = sanInput;
  }

  public MoveInput(String sanMove) {
    this.sanInput = sanMove;
  }
  
  public MoveInput(String from, String to) {
    this.from = from;
    this.to = to;
  }
  
  public MoveInput(String from, String to, int promotion) {
    this (from, to);
    this.promotion = promotion;
  }
  
  public boolean isPromotion() {
    return promotion != 0;
  }
  
  public int getPromotion() {
    return promotion;
  }

  public void setPromotion(int promotion) {
    this.promotion = promotion;
  }
  
  public String getFrom() {
    return from;
  }

  public String getTo() {
    return to;
  }

  public boolean isScored() {
    return isScored;
  }
   
  public int getScore() {
    return score;
  }

  public void setScore(int score) {
    this.isScored = true;
    this.score = score;
  }

  public void setScoreTree(MoveInput[] moveTree) {
    this.scoreTree = moveTree;
  }
  
  public MoveInput[] getScoreTree() {
    return scoreTree;
  }

  public int getScoreDepth() {
    return scoreDepth;
  }

  public void setScoreDepth(int scoreDepth) {
    this.scoreDepth = scoreDepth;
  }

}
